home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / (A)U / (A)U5.ADF / NGC / NGC.doc < prev    next >
Text File  |  1989-11-12  |  6KB  |  175 lines

  1.                   - - -   N G C   - - -
  2.  
  3.        - - -   N o t e s   O n   D i s t r i b u t i o n   - - -
  4.  
  5. Release one : 02 - August - 1989
  6.  
  7. (C) Copyright By Ulf Nordquist.
  8.  
  9. This software may only be used for non-commercial purposes, but may be freely
  10. distributed as long as all the files in the package are kept together.
  11.  
  12. The package consists of these four files:
  13.  
  14. ngc.a      (the source code)
  15. ngc.info  (the icon)
  16. ngc      (the program)
  17. ngc.doc   (this file)
  18.  
  19. The Virus directory is not part of the package, it contains some differnt
  20. bootblocks :
  21.    ByteBandit
  22.    SCAVirusProtector
  23.    TheLamerExterminator
  24.    FormatBootblock          (the bootblock of a newly formatted disk)
  25.    StandardBootblock
  26.  
  27.    The Byte Bandit and The Lamer Exterminator virus are different on each
  28.    infected bootblock, so the compare function will not recognize them.
  29.  
  30.         - - -   N o t e s    O n   T h e   P r o g r a m   - - -
  31.  
  32. The source file (ngc.a) is completely stand alone and does not need to be
  33. linked with any other files or libraries, just assemble and link it by
  34. itself.
  35.  
  36. It can be started from the CLI or the Workbench.
  37. If it is started from the CLI it can be started as :
  38. 'run >nil: <nil: ngc' to allow the cli window it started from to be
  39. closed with endcli.
  40.  
  41.            - - -   W h a t   I t   D o e s   - - -
  42.  
  43. First it opens a small window labeled NGC in the top of the screen. After
  44. this it will check the bootblock on all attached floppy disk drives with a
  45. disk inserted. If a non-standard bootblock is found it will be reported. Then
  46. it will check the jump tables of all resident libraries and devices. If any
  47. suspicious entry is found it will also be reported.
  48. When this is completed it will go to sleep. It will wake up when a disk is
  49. inserted into a drive, check the bootblock on it and report if it is a non-
  50. standard bootblock.
  51.  
  52.         - - -    H o w    T o   U s e   I t   - - -
  53.  
  54. To be able to use the compare function, assign the device ngcbb: to the
  55. directory Virus (or any other directory where there are copies of bootblocks)
  56.  
  57.    assign ngcbb: ThisDisk:NGC/Virus
  58.  
  59. If a disk with a non-standard bootblock is inserted, a window is opened with
  60. two lines of text and four gadgets :
  61.  
  62.    The first line of of text is a description of the error causing the window
  63.    to open. The second line tells which drive it is.
  64.  
  65.    The gadgets :
  66.  
  67.    1. Continue       - Closes the window.
  68.  
  69.    2. Save       - Saves the bootblock as a normal AmigaDOS file.
  70.              See 'Save as file'
  71.  
  72.    3. Install       - Writes a standard bootblock to the disk.
  73.  
  74.    4. Save as file - Here the file name is entered, which the save gadget
  75.              will use. (Save them in ngcbb:, see Compare gadget).
  76.  
  77.    Be aware that a non-standard bootblock not necessarily is a virus. A
  78.    typical case is games, which often uses the bootblock to load the game.
  79.  
  80. If the menu button is pressed in the small startup window, a similar window
  81. is opened, but it has four extra gadgets :
  82.  
  83.    5. Check       - Force a check of the bootblock in the current drive.
  84.  
  85.    6. Compare       - Compares the current bootblock with saved bootblocks.
  86.              It will compare the current bootblock with all files
  87.              (with size = 1024 bytes) in the directory assigned to
  88.              ngcbb:.
  89.              Example : Insert a disk with a standard bootblock in the
  90.                    current drive, press the compare gadget, after
  91.                    a while the first text line should read:
  92.                    'Found: StandardBootbl'
  93.  
  94.    7. +        - Increase current drive number and check the disk in it.
  95.  
  96.    8. -        - Decrease current drive number and check the disk in it.
  97.  
  98.    The text lines are updated as disks are inserted, installed, checked and
  99.    compared.
  100.  
  101. If a suspicious entry is found in a jump table it is reported with a
  102. requester, (jump tables are only checked at start-up)
  103.    Example : if workbench running, a requester will come up reading :
  104.  
  105.          Suspicious entry at -276
  106.          intuition.library
  107.  
  108.          -276 is the decimal byte offset from the library base, in this
  109.          case : -276 in intuition.library is _LVOSetWindowTitles
  110.  
  111.    Be aware that workbench and setpatch changes some entries in the jump
  112.    tables.
  113.  
  114.       The workbench I have changes :
  115.      -060 in graphics.library
  116.      -276 in intuition.library
  117.  
  118.       The setpatch I have changes :
  119.      -108 in exec.library
  120.      -222 in exec.library
  121.      -090 in layers.library
  122.  
  123.    A virus typically changes in trackdisk.device.
  124.  
  125. The close gadget in the startup window will exit the program.
  126.  
  127. ============================================================================
  128.  
  129.     - - -    W h y    I   M a d e   T h i s    P r o g r a m    - - -
  130.  
  131. For some time I had thought about writing a program that could read
  132. bootblocks and save them, beacause I wanted to look at viruses and see how
  133. they work. I just thought about it, I never did it, until...
  134.  
  135. Enter 'The Lamer Exterminator !'
  136.  
  137. Suddenly my assembler work disk had read/write errors, and program crashed.
  138. After a while I used xoper (highly recommended) to look at tasks and list and
  139. in the resident list I found an entry called 'The Lamer Exterminator !'.
  140.  
  141. So I wrote this program, NGC, it will find the two changes 'The Lamer
  142. Exterminator !' does to the jump tables :
  143.  
  144.    If 'The Lamer Exterminator !' is in the memory, two changes are found :
  145.  
  146.          Suspicious entry at -612       Suspicious entry at -030
  147.          exec.library           trackdisk.device
  148.  
  149.          This is _LVOSumKickData       This is BEGINIO
  150.  
  151. ============================================================================
  152.  
  153. Thanks to:
  154. Commodore-Amiga, Inc. for the computer
  155. Matt Dillon for the editor
  156. Charlie Gibbs for the assembler
  157. The Software Distillery for the linker
  158. Metadigm, Inc. for the debugger
  159. Werner Gunther, for Xoper
  160.  
  161. ============================================================================
  162.  
  163. I have used the program for some time myself, and it works fine.
  164. This means that there are bugs left to find, so...
  165.  
  166. Comments and bug reports are welcome
  167.  
  168.        Ulf Nordquist
  169.        Brunnehagen 36
  170.        417 47 Gothenburg
  171.        Sweden
  172.  
  173. PS. New (and old) viruses are also welcome.
  174.  
  175.